package com.example.testgit.mapstruct;


import com.example.testgit.VO.DeepCoachVO;
import com.example.testgit.entity.DeepCoachDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface DeepCoachConverter {

    DeepCoachConverter INSTANCE = Mappers.getMapper(DeepCoachConverter.class);

    @Mappings({
            @Mapping(source = "coachTime", target = "coachTime", dateFormat = "yyyy年MM月dd日")
    })
    DeepCoachVO toVO(DeepCoachDO deepCoachDO);

    @Mappings({
            @Mapping(source = "coachTime", target = "coachTime", dateFormat = "yyyy年MM月dd日")
    })
    List<DeepCoachVO> toVOList(List<DeepCoachDO> deepCoachDOList);
}
